#include<stdio.h>
struct Students{
        char name[10];
        int grades;
}; 

void zong(struct Students* stu, int* len){ //输入初始化
    int al=0,low=0;
    for(int i =0;i<*len;i++){
        al+=stu[i].grades;
        if(stu[i].grades <= 140){
            low++;
        }
    }
    printf("总成绩:%d 平均分:%.1f 140分以下有%d名学生\n",al,(float)al/(*len),low);

}

int main(int argc,char* argv[])
{   
    struct Students stu[10]={
        {"a",110},
        {"b",120},
        {"c",130},
        {"d",140},
        {"e",150},
        {"f",160},
        {"g",170},
        {"h",120},
        {"i",159},
        {"j",170}
    };
    int len=sizeof(stu)/sizeof(stu[0]);
    zong(stu,&len);
    return 0;
}
